<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新api</title>
    <link rel="stylesheet" href="http://221.0.77.189:50/arcgis_js_api_410/library/4.10/esri/css/main.css" />
    <script type="text/javascript">
        dojoConfig = {
            parseOnLoad:true,
            packages:[{
                name:"custom",
                location:"custom"
            },{
                name: "td",
                location: "js/tdlib"
            }]
        };
    </script>
    <script src="http://221.0.77.189:50/arcgis_js_api_410/library/4.10/init.js"></script>
</head>
<body>
<div id="map" style="width: 900px; height: 800px;"></div>
<script>

    gisServerUrl = "http://221.0.77.189:6080/arcgis/rest/services/";
    gisResourceUrl = "http://221.0.77.189:50/gis_static_resource/";
    require(
        [
            "esri/Map",
            "esri/views/SceneView",
            "esri/Basemap",
            "esri/layers/WebTileLayer",
            "esri/layers/FeatureLayer",
            "dojo/domReady!"
        ],function (Map,SceneView,Basemap,WebTileLayer,FeatureLayer) {

            // var baseLayer = new WebTileLayer('http://${subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL=${col}&TILEROW=${row}&TILEMATRIX=${level}&tk=79fa0ad8cf51823310e763e1fb3bdb22',{
            //     subDomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"]
            // })
            // var annotationLayer = new WebTileLayer('http://${subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL=${col}&TILEROW=${row}&TILEMATRIX=${level}&tk=79fa0ad8cf51823310e763e1fb3bdb22', {
            //     subDomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"]
            // })

            var basemap = new Basemap({
                baseLayers: [
                    new WebTileLayer('http://{subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL=${col}&TILEROW=${row}&TILEMATRIX=${level}&tk=79fa0ad8cf51823310e763e1fb3bdb22',{
                        subDomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"]
                    })
                ],
                referenceLayers: [
                    new WebTileLayer('http://{subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL=${col}&TILEROW=${row}&TILEMATRIX=${level}&tk=79fa0ad8cf51823310e763e1fb3bdb22', {
                        subDomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"]
                    })
                ],
            });

            var map = new Map({
                basemap: basemap,
                //ayers: [baseLayer, annotationLayer]
            });

            var centerLine = new FeatureLayer(gisServerUrl + "COUNTYLINE/MapServer/1",{
                mode:FeatureLayer.MODE_ONDEMAND,
                outFields:["*"],
                infoTemplate:null
            });
            map.add(centerLine);
            var view = new SceneView({
                container:"map",
                map:map,
                zoom:11,
                center:[120.464,37.355]
            });



        });

</script>
</body>
</html>